
const g = require('./global');

// 在x轴上随机获取坐标
function randXinSky() {
    return Math.floor(Math.random()*g.SKY_WIDTH)
}

function randEnemySpeed() {
    const r = Math.random();
    const flag = r > 0.5 && 1 || -1;
    return Math.floor(Math.random()*g.AnimTime.enemyDown*flag)
}

module.exports = {
    randXinSky,
    randEnemySpeed,
};